'use strict';

import Base from './base.js';

const DEFULT_AUTO_REPLY = '功能正在开发中~';

export default class extends Base {

  async indexAction(){
    let echostr = this.get('echostr');
    return this.end(echostr);
  }
  
  reply(message){
    this.http.res.reply(message);
  }
  
  async textAction(){
    var message = this.post();
    var msg = message.Content.trim();
    this.reply('测试成功:'+msg);
  }

  async eventAction(){
    var message = this.post();
    this.reply(JSON.stringify(message));
  }

  __call(){
    this.reply(DEFULT_AUTO_REPLY);
  }
}